package com.luxoft.scoremanager.server.dao.repository;

import com.luxoft.scoremanager.server.model.entity.ComponentValue;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface ComponentValueDao extends JpaRepository<com.luxoft.scoremanager.server.model.entity.ComponentValue, Integer> {

    @Query("FROM ComponentValue E WHERE E.scorePackage.id = :package_id")
    public List<com.luxoft.scoremanager.server.model.entity.ComponentValue> getAllForPackage(@Param("package_id") int id);
}
